/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package creature;

import java.awt.Color;
import java.awt.Graphics;
import world.World;

/**
 *
 * @author leadiv
 *  By Default a creature is a small green 1 pixel dot that runs east to west.
 */
public class Creature {
    private int x;
    private int y;
    private Color skinColor;
    private int id;
    
    public Creature(int x, int y, int id) {
        this.x = x;
        this.y = y;
        this.id = id;
        this.skinColor = Color.GREEN;
    }
    
    public void draw(Graphics g) {
        // draw a creature
        g.setColor(getSkinColor());
        g.fillRect(x, y, 1, 1);
    }
    
    public void move(World w) 
    {   
        w.place(x+1, y, id);
    }

    public boolean isDead() {
        return false;
    }
    
    public Color getSkinColor()
    {
        return this.skinColor;
    }
    
    public void setSkinColor(Color c)
    {
        this.skinColor = c;
    }
    
    public int getX()
    {
        return x;
    }
    
    public int getY()
    {
        return y;
    }
    
    public void setX(int x)
    {
        this.x = x;
    }
    
    public void setY(int y)
    {
        this.y = y;
    }
    
    public int getId()
    {
        return this.id;
    }
    
    public void setId(int id)
    {
        this.id = id;
    }
}
